﻿/**
* @file navmsg.h in FusionUnitXIH6
* @author rebeater
* @comment 导航消息，用于RTOS中消息队列
* Create on 12/17/21 6:41 PM
* @version 1.0
**/

#ifndef FUSIONUNITXIH6_CORE_INC_NAVMSG_H_
#define FUSIONUNITXIH6_CORE_INC_NAVMSG_H_
#include "global_defines.h"
#include "nav_struct.h"
#include "rtcommon.h"
typedef enum {
  DATA_TYPE_IMU = 0,
  DATA_TYPE_GNSS = 1,
  DATA_TYPE_VEL = 2,
  DATA_TYPE_BMP = 3,
  DATA_TYPE_RST = 4
}DataTypeDef;

typedef struct {
  GnssData data;
  double gpst;
  short week;
}GnssMsg;

typedef struct {
  IMU_RAW data;
  double gpst;
}ImuMsg;

typedef struct {
  NavOutput data;
  double gpst;
}NavMsg;

typedef struct {
  VelocityRaw data;
  double gpst;
}VelocityMsg;

typedef struct {
  union {
    struct{
      IMU_RAW raw_;
      short ab_[3];/*mGal*/
      short gb_[3];/*deg/h*/
    } imu_;
    NavOutput rst_;
    GnssData gnss_;
    VelocityRaw vel_;
  };
  double gpst;
  DataTypeDef type_;
} RawDataDef;

#endif //FUSIONUNITXIH6_CORE_INC_NAVMSG_H_
